package com.gdqy.FCS.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gdqy.FCS.dao.SpecialDao;
import com.gdqy.FCS.entity.Special;

@Service
@Transactional
public class SpecialService {

	@Autowired 
	private SpecialDao specialDao;
	
	public int insert(Special special){
		return specialDao.insert(special);
	}
	
	public int update(Special special){
		return specialDao.update(special);
	}
	
	public int delete(Special special){
		return specialDao.delete(special);
	}
	
	//通过设计师id查询专辑
	public List<Special> selectByDesigner_id(int designer_id){
		return specialDao.selectByDesigner_id(designer_id);
	}
	
	//通过专辑名查询
	public List<Special> selectByName(String name){
		return specialDao.selectByName(name);
	}
	
	//通过设计师id和专辑名查询
	public Special selectByDesigner_id_and_name(Special special){
		return specialDao.selectByDesigner_id_and_name(special);
	}
	//通过id查询
	public  Special selectById(int id){
		return specialDao.selectById(id);
		
	}
	//查询专辑总数
	public int selctCountByDesignerId(int designer_id){
		return specialDao.selctCountByDesignerId(designer_id);
	}
}
